export function useModel<T = Record<string, any>>(fields: FormFields): T {
	const model = reactive({}) as T
	fields.forEach(item => {
		const { field, initValue, type } = item
		if (type === 'cDateRange' && Array.isArray(field)) {
			model[field[0]] = initValue?.[0]
			model[field[1]] = initValue?.[1]
		} else if (type !== 'title' && field && typeof field === 'string') {
			model[field] = initValue
		}
	})
	return model
}
